<!-- 提现记录 -->
<template>
	<z-paging ref="paging" v-model="dataList" @query="queryList" class="paging" v-if="isshow"">
		<view class="record">
			<view class="item" v-for="(item,index) in dataList" :key="index">
				<view class="title">
					<view>{{item.cashAccount ==0?'微信':'支付宝'}}</view>
					<view class="time">{{item.createTime}}</view>
				</view>
				<view class="content">
					<view class="left">
						<view class="money">{{item.cashMoney}}</view>
						<view>提现金额（元）</view>
					</view>
					<view class="right">
						<!-- 审核状态(0待审核，1审核通过，2审核驳回,3撤销) -->
						<image v-if="item.examineStatus == 0" src="https://yzxk.oss-cn-hangzhou.aliyuncs.com/images/mine/yield/status0.png"></image>
						<image v-if="item.examineStatus == 1" src="https://yzxk.oss-cn-hangzhou.aliyuncs.com/images/mine/yield/status1.png"></image>
						<image v-if="item.examineStatus >=2" src="https://yzxk.oss-cn-hangzhou.aliyuncs.com/images/mine/yield/status2.png"></image>
					</view>
				</view>
			</view>
		</view>
	</z-paging>
</template>

<script>
	import {
		extractRecord
	} from '@/apis/apis.js'
	export default {
		data() {
			return {
				dataList: [],
				isshow:false
			}
		},
		onLoad(options) {
			// 类型（1：邀请收益，2：创作收益）
			this.type = options.type ? options.type : null
		},
		onShow() {
			this.isshow = true
		},
		onHide() {
			this.isshow = false
		},
		methods: {
			queryList(pageNo, pageSize) {
				extractRecord({
					accountType: this.type,
					pageNum: pageNo,
					pageSize: pageSize
				}).then(res => {
					console.log(res)
					//examineStatus	审核状态(0待审核，1审核通过，2审核驳回,3撤销)
					this.$refs.paging.complete(res.data);
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.paging {
		background-color: #F8F8F8;

		.record {
			padding: 38rpx 30rpx;

			.item {
				background: #FFFFFF;
				box-shadow: 0px 2rpx 90rpx 0px rgba(174, 185, 190, 0.2000);
				border-radius: 10rpx;
				margin-bottom: 26rpx;

				.title {
					display: flex;
					align-items: center;
					justify-content: space-between;
					padding: 36rpx 26rpx;
					border-bottom: 2rpx solid #E9E9E9;

					.time {
						font-size: 26rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #999999;
					}
				}

				.content {
					display: flex;
					align-items: center;
					padding: 36rpx 30rpx 24rpx 36rpx;
					justify-content: space-between;

					.left {
						.money {
							font-size: 44rpx;
							font-family: DIN;
							font-weight: 500;
							color: #FF8809;
							margin-bottom: 26rpx;
						}
					}

					.right {
						image {
							width: 140rpx;
							height: 98rpx;
						}
					}
				}
			}
		}
	}
</style>
